package com.djk.service.impl;

import com.djk.mapper.SysScheduleMapper;
import com.djk.pojo.SysSchedule;
import com.djk.service.SysScheduleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysScheduleServiceImpl implements SysScheduleService {
    @Autowired
    private SysScheduleMapper scheduleMapper;

    @Override
    public void deleteSchedule(Integer sid) {
        scheduleMapper.deleteById(sid);
    }

    @Override
    public List<SysSchedule> findAllSchedule(Integer uid) {
        return scheduleMapper.findAllByUid(uid);
    }

    @Override
    public void addSchedule(SysSchedule schedule) {
        scheduleMapper.addSchedule(schedule);
    }

    @Override
    public void updateSchedule(SysSchedule schedule) {
        scheduleMapper.updateSchedule(schedule);
    }

}
